package com.bsoft.gol.hcs.enumcase;

/**
 * @author tongtp
 * @version v0.1
 * @package enumcase
 * @className ReadStatusEnum
 * @description 已读未读状态
 * @create 2021-08-10 21:04
 **/
public enum ReadStatusEnum {

	//	状态： 0 未读 1 已读
	UNREAD((byte) 0, "未读"),
	READ((byte) 1, "已读");

	private final Byte status;

	private final String name;

	ReadStatusEnum(Byte status, String name) {
		this.status = status;
		this.name = name;
	}

	public static ReadStatusEnum getEnumByKey(Byte status) {
		for (ReadStatusEnum temp : ReadStatusEnum.values()) {
			if (temp.getStatus().equals(status)) {
				return temp;
			}
		}
		return null;
	}

	public Byte getStatus() {
		return status;
	}

	public String getName() {
		return name;
	}
}
